<template>
<div>
    <h1>喜欢操少妇</h1>
    <h3>携带的参数小少爷</h3>
    {{route}}
    <hr></hr>
    {{boy}}
    {{boy.name}}
    {{boy.age}}

</div>
</template>
<script>
export default{
    //子组件中，定义传入的变量的类型等  

    
   
    data(){
        return{
             route:
           {
               name:this.$route.name,
               path:this.$route.path,
               param:this.$route.params,
               query:this.$route.query
            
           },
           boy: this.$route.query.boy
        }
    },
    mounted(){
        this.add()
    },
    methods:{
        add(){
            console.log(12315)
            for(let i = 0 ;i<this.boy.length;i++){
                console.log(this.boy[i])
            }
        }
    }
  

}
</script>